# coding = utf-8
from case.api.wechat_views import WxCaseViewSet, WxCaseClientViewSet, WxCustomerCaseViewSet
from django.urls import path
from rest_framework.routers import DefaultRouter
from .views import CaseViewSet, LetterViewSet, CaseListAPIView, LetterStampViewSet, IntroduceViewSet, \
    IntroduceStampViewSet, ProgressViewSet, CaseProgressViewSet, ReasonViewSet, ReasonListAPIView, \
    CriminalIntroduceViewSet, FileUploadAPIView, CaseFileViewSet, CriminalIntroduceStampViewSet, ProgressParentViewSet, \
    ProgressTreeViewSet, CaseSearchAPIView

router = DefaultRouter()
router.register(r'case', CaseViewSet, basename="case")
router.register(r'letter', LetterViewSet, basename="letter")
router.register(r'introduce', IntroduceViewSet, basename="introduce")
router.register(r'criminal_introduce', CriminalIntroduceViewSet, basename="criminal-introduce")
router.register(r'letter_stamp', LetterStampViewSet, basename="letter-stamp")
router.register(r'intro_stamp', IntroduceStampViewSet, basename="intro-stamp")
router.register(r'crim_intro_stamp', CriminalIntroduceStampViewSet, basename="criminal-intro-stamp")
router.register(r'progress', ProgressViewSet, basename="progress")
router.register(r'progress_tree', ProgressTreeViewSet, basename="progress-tree")
router.register(r'parent_progress', ProgressParentViewSet, basename="parent-progress")
router.register(r'case_progress', CaseProgressViewSet, basename="case-progress")
router.register(r'reason', ReasonViewSet, basename="case-reason")
router.register(r'file', CaseFileViewSet, basename="case-file")
router.register(r'wx_case', WxCaseViewSet, basename="wx-case")
router.register(r'wx_client_case', WxCaseClientViewSet, basename="wx-client-case")
router.register(r'wx_customer_case', WxCustomerCaseViewSet, basename="wx-customer-case")


urlpatterns = [
    path('case_list/', CaseListAPIView.as_view(), name="api-case-list"),
    path('case_search/', CaseSearchAPIView.as_view(), name="api-case-search"),
    path('reason_list/', ReasonListAPIView.as_view(), name="api-reason-list"),
    path('file_upload/', FileUploadAPIView.as_view(), name="api-file-upload"),
]

urlpatterns += router.urls